package com.zhongxi.guoyuan.entity;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2016/11/12.
 */

public class BaseResult {

    private String now;
    private String key;
    private String safestring;
    private String userkey;

    public String getNow() {
        return now;
    }

    public void setNow(String now) {
        this.now = now;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getSafestring() {
        return safestring;
    }

    public void setSafestring(String safestring) {
        this.safestring = safestring;
    }

    public String getUserkey() {
        return userkey;
    }

    public void setUserkey(String userkey) {
        this.userkey = userkey;
    }

    public static BaseResult parseMatch(JSONObject baseObj){
        BaseResult result = new BaseResult();
        try {
            result.setKey(baseObj.getString("key"));
            result.setNow(baseObj.getString("now"));
            result.setSafestring(baseObj.getString("safestring"));
            result.setUserkey(baseObj.getString("userkey"));
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return result;
    }
}
